package per.xue.carid_booking.entity;


import javax.persistence.*;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;


/**
 * <p>
 * 
 * </p>
 *
 * @author ${author}
 * @since 2021-05-22
 */
@Data
@ApiModel(value="car")
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "car")
public class Car implements Serializable {



    /**
     * 车次id
     */
    
        @Id
        @Column(name = "car_Id")
                @ApiModelProperty(value = "车次id",name = "carId",dataType = "String")
        private String carId;

    /**
     * 发车时间
     */
    @Column(name = "time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
        @ApiModelProperty(value = "发车时间",name = "time",dataType = "LocalDateTime")
        private Date time;

    /**
     * 初始站
     */
    @Column(name = "start_station_Id")
        @ApiModelProperty(value = "初始站",name = "startStationId",dataType = "Integer")
        private Integer startStationId;

    /**
     * 终点站
     */
    @Column(name = "end_station_Id")
        @ApiModelProperty(value = "终点站",name = "endStationId",dataType = "Integer")
        private Integer endStationId;

    /**
     * 价格
     */
    @Column(name = "price")
        @ApiModelProperty(value = "价格",name = "price",dataType = "BigDecimal")
        private Double price;

    /**
     * 剩余量
     */
    @Column(name = "surplus_num")
        @ApiModelProperty(value = "剩余量",name = "surplusNum",dataType = "Integer")
        private Integer surplusNum;

    /**
     * 状态，0表示未发车，1表示已发车
     */
    @Column(name = "stats")
        @ApiModelProperty(value = "状态，0表示未发车，1表示已发车",name = "stats",dataType = "String")
        private String stats;


}


